package com.shuang.springweb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.shuang.springweb.service.UserService;

@Controller
@RequestMapping("/user")
public class UserContrlloer {

	@Autowired
	private UserService userService;


	public UserContrlloer() {
		System.out.println("UserContrlloer");
	}

	@RequestMapping(value = "helloWorld")
	public String helloWorld(Model model) {
		model.addAttribute("message", userService.get());
		return "index";
	}
}
